package com.letao.server.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class SkuInfoDTO {

    private Long sales;

    private Integer skuCommentNum;

    private Integer oneCategoryId;

    private Integer twoCategoryId;

    private String oneCategoryName;

    private String twoCategoryName;

    private String spuName;

    private String spuImage;

    private Long Id;
    /**
     * 所属SPU的Id
     */
    private Long spuId;
    /**
     * SKU名称
     */
    private String skuName;
    /**
     * 价格
     */
    private Double price;

    private Long stock;
    /**
     * 描述
     */
    private String descript;
    /**
     * 是否有描述图片
     */
    private String hasImage;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime modifiedTime;
}
